package com.dgy.project.service.impl;

import java.util.List;

import com.dgy.project.domain.ProjectNotice;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dgy.project.mapper.ProjectNoticeMapper;
import com.dgy.project.service.IProjectNoticeService;

/**
 * 课题申报通知Service业务层处理
 *
 * @author ccc
 * @date 2025-03-13
 */
@Service
public class ProjectNoticeServiceImpl implements IProjectNoticeService
{
    @Autowired
    private ProjectNoticeMapper ProjectNoticeMapper;

    /**
     * 查询课题申报通知
     *
     * @param noticeId 课题申报通知主键
     * @return 课题申报通知
     */
    @Override
    public ProjectNotice selectProjectNoticeByNoticeId(Long noticeId)
    {
        return ProjectNoticeMapper.selectProjectNoticeByNoticeId(noticeId);
    }

    /**
     * 查询课题申报通知列表
     *
     * @param ProjectNotice 课题申报通知
     * @return 课题申报通知
     */
    @Override
    public List<ProjectNotice> selectProjectNoticeList(ProjectNotice ProjectNotice)
    {
        return ProjectNoticeMapper.selectProjectNoticeList(ProjectNotice);
    }

    /**
     * 新增课题申报通知
     *
     * @param ProjectNotice 课题申报通知
     * @return 结果
     */
    @Override
    public int insertProjectNotice(ProjectNotice ProjectNotice)
    {
        ProjectNotice.setCreateTime(DateUtils.getNowDate());
        return ProjectNoticeMapper.insertProjectNotice(ProjectNotice);
    }

    /**
     * 修改课题申报通知
     *
     * @param ProjectNotice 课题申报通知
     * @return 结果
     */
    @Override
    public int updateProjectNotice(ProjectNotice ProjectNotice)
    {
        ProjectNotice.setUpdateTime(DateUtils.getNowDate());
        return ProjectNoticeMapper.updateProjectNotice(ProjectNotice);
    }

    /**
     * 批量删除课题申报通知
     *
     * @param noticeIds 需要删除的课题申报通知主键
     * @return 结果
     */
    @Override
    public int deleteProjectNoticeByNoticeIds(Long[] noticeIds)
    {
        return ProjectNoticeMapper.deleteProjectNoticeByNoticeIds(noticeIds);
    }

    /**
     * 删除课题申报通知信息
     *
     * @param noticeId 课题申报通知主键
     * @return 结果
     */
    @Override
    public int deleteProjectNoticeByNoticeId(Long noticeId)
    {
        return ProjectNoticeMapper.deleteProjectNoticeByNoticeId(noticeId);
    }
}
